package com.iflytek.top1;

import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;

public class BestTop1Reducer extends Reducer<BestBean, NullWritable, BestBean,NullWritable> {
    @Override
    protected void reduce(BestBean key, Iterable<NullWritable> values, Context context) throws IOException, InterruptedException {
        //不遍历迭代器，此时key就是分组中的第一个key 也就是该类型评论数最多的图书名字对应的数据
        context.write(key,NullWritable.get());
    }
}